package com.istock.state.demo.api;

import java.util.Map;

import javax.ws.rs.Consumes;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;

import com.istock.base.common.api.model.ApiBaseResponse;

@Path("newMock")
public interface NewMockService {

	/**通过传入的payId,查询当前的payId的支付结果
	 * @param payId
	 * @return
	 */
	public ApiBaseResponse<String> searchPay(@QueryParam("requestId") Long requestId);
	
	/**模拟调用支付接口,返回处理中,后面会通过MQ,异步回调支付结果
	 * @param payId
	 * @param amount
	 * @return
	 */
	@Consumes(value="application/json")
	public ApiBaseResponse<String> payApply(Map<String , Object> paramMap);
	
	public ApiBaseResponse<String> searchGoods(@QueryParam("requestId") Long requestId);
	
	public ApiBaseResponse<String> goodsApply(@QueryParam("goodsId")Long goodsId);
	
	
	/**模拟一个远程调用超时引发的事务问题
	 * @param payModel
	 * @return
	 */
	public ApiBaseResponse<Map<String ,Object>> badPay(Map<String , Object> paramMap);
}
